#include<stdio.h>
#include<string.h>

char* str_bin(char* str1, char* str2)
{
	char s3[210];

	int t1=0, t2=0, t3=0;

	while(str1[t1]!='\0' && str2[t2]!='\0')
	{
		if(str1[t1]<=str2[t2])
		{
			s3[t3] = str1[t1];
			t3++; t1++;
		}
		else
		{
			s3[t3] = str2[t2];
			t3++; t2++;
		}
	}
	while(str1[t1]!='\0')
	{
		s3[t3] = str1[t1];
		t3++;t1++;
	}
	while(str2[t2]!='\0')
	{
		s3[t3] = str2[t2];
		t3++;t2++;
	}
	s3[t3] = '\0';
	strcpy(str1,s3);
	return str1;
}

int main()
{
	char s1[210], s2[110];
	scanf("%s",s1);
	scanf("%s",s2);

	str_bin(s1, s2);

	printf("%s",s1);
	return 0;
}
